Various embodiments of the invention are related to printing devices, and particularly to a method and apparatus for generating printer commands for controlling a printer, based on Hypertext Markup Language (HTML). Applicant has identified a number of deficiencies and problems associated with the printing of labels or other media on printers. Through applied effort, ingenuity, and innovation, Applicant has solved many of these identified problems by developing a solution that is embodied by the present invention, which is described in detail below.